<template>
    <router-link :to="{ path: '' + getLinkUrl(nodeItem.href, scope.row), query: { data: getLinkParams(nodeItem.href, scope.row) } }">
        {{ scope.row[nodeItem.text] }} </router-link>
</template>
<script setup>
import { ref ,computed} from 'vue'
import { paramParsing } from '@/utils/parsing'
const props = defineProps({
    nodeItem: {
        type: Object,
        defalut: {}
    },
    scope: {
        type: Object,
        defalut: {}
    }
})
const getLinkUrl = computed(() => {
    return function (value, item) {
        var href = value.split('?');
        return href[0]
    }
})
const getLinkParams = computed(() => {
    return function (value, item) {
        var linkParams = '';
        var href = value.split('?');
        linkParams = paramParsing(href[1], item)
        return linkParams
    }
})
</script>
